package com.beta.user.auth.center.api.response;

import com.beta.elephant.constant.IRetCode;

/**
 * @author by lchen2
 * @Classname CommonResultEnum
 * @Date 2021/7/1 4:03 下午
 */
public enum CommonResultEnum implements IRetCode {

    REQUEST_SUCCESS(0,"请求成功"),
    PARAMETER_ERROR(60000,"参数错误"),
    MISSING_REQUEST_PARAMETER(60005, "缺失请求参数"),
    PARAMETER_VERIFICATION_ABNORMAL(60006, "参数校验失败"),
    PARAMETER_TYPE_DOES_NOT_MATCH(60007, "参数类型不匹配"),
    REQUEST_METHOD_IS_ABNORMAL(60008, "请求方式异常"),
    FAILED_TO_PARSE_PARAMETERS(60009, "解析参数失败"),
    SYSTEM_HAS_MALFUNCTIONED(60010, "请求失败"),
    PARAMETER_HAS_NO_CORPID(60011, "缺少corpId参数"),
    PARAMETER_HAS_NO_SECRET(60012, "缺少corpSecret参数"),
    SYSTEM_IS_BUSY(60013, "超频请求"),
    PARAMETER_CORPID_NOT_MATCH(60014, "corpId不匹配"),
    PARAMETER_URL_DECODE_FAIL(60015, "URL Decode失败"),
    EMPTY_RESULT(60016, "查无结果"),

    ;

    private int state;
    private String message;

    CommonResultEnum(int state, String message) {
        this.state = state;
        this.message = message;
    }

    public int getState() {
        return state;
    }


    public String getMessage() {
        return message;
    }


    @Override
    public String getCode() {
        return String.valueOf(state);
    }

    @Override
    public String getMsg() {
        return message;
    }
}
